function controls(){
	$(document).keydown(function (e) {
		switch(e.which) {
			case 38: //UP
				for(var i=0; i< bolas.length; i++){
					bolas[i].start();							
				}
			break;
			case 39: //Right
				if(barra.x + barra.w + barra.vx <= 500 ){
					barra.vx = 8;
					barra.m = 1;
				}
				break;
			case 40: //Down
			break;
			case 37: //left
				if(barra.x - barra.vx >= 0 ){
					barra.vx = -8;
					barra.m = -1;
				}
				break;
		}
	});
	

$(document).keyup(function (e) {
	switch(e.which) {
		case 38: //UP
			break;
		case 39: //Right
			barra.vx = 0;
			barra.m = 0;
			break;
		case 40: // Down
			break;
		case 37: //left
			barra.vx = 0;
			barra.m = 0;
			break;
	}
});
}